<html>
<head><meta charset="utf-8"><title>thread ids · t-compiler/wg-self-profile · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/index.html">t-compiler/wg-self-profile</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/thread.20ids.html">thread ids</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="176268237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/thread%20ids/near/176268237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/thread.20ids.html#176268237">(Sep 21 2019 at 15:01)</a>:</h4>
<p>The current logic calls thread::current().id() on every event afaict, which I presume is actually somewhat expensive -- it's a TLS lookup, then an Arc::clone -- neither of which is particularly cheap, though I haven't profiled. I suspect we might be able to recoup some performance if we were to not collect thread IDs; afaict for perf.rlo we don't need them (they're not represented in <code>summarize</code> output)</p>



<a name="176349414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/thread%20ids/near/176349414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/thread.20ids.html#176349414">(Sep 23 2019 at 08:33)</a>:</h4>
<p>for multithreaded rustc they will be important. but maybe we could make recording them opt-in? we should profile though, if that really makes a difference,</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>